<style>
    .paylist ul li{display:block;float:left;width:50%;margin-bottom:20px;}
    .paylist ul,.paylist li{padding:0;margin:0}
    .paylist .m50{background-position:-50px -291px;}
    .paylist .m100{background-position:-364px -291px;}
    .paylist .m30{background-position:-50px -89px}
    .paylist .m300{background-position:-364px -89px}
    .paylist .m500{background-position:-678px -89px}
    .paylist ul li span{margin-left: 110px;}
    .gift{width:297px;height:184px;}
    .receive{
        float: left;
        background: url(/images/share/global-button.gif) no-repeat 0 0;
        height: 35px;
        color: #fff;
        font-family: "Microsoft YaHei","simsun";
        font-size: 16px;
        line-height: 35px;
        margin-top: 8px;
        margin-left:80px;
        width:130px;
        text-align:center;
    }
    .receive:hover{background-position:0 -45px;}
</style>
<div class="center">
    <div class="home">
        <div class="home_left">
            <?php echo $this->partial('member/menu.phtml', array('menuId' => $this->menuId, 'user' => $this->user, 'uCount' => $this->uCount,'account'=>$this->account)); ?>
        </div>
        <div class="home_right">
            <div class="replacerechargetop">
                <i></i>
                <div class="replacerechargetname">
                    <h1>会员礼物领取</h1>
                    <p>领取悠奇为海外华侨精心准备的礼物</p>
                </div>
            </div>
            <div class="replacerechargetab">
                <ul>
                    <li class="tabon"><a class="tab1" href="#"><i></i>领取会员礼物</a></li>
                </ul>
            </div>

            <div class="apply">
                <form id="form1" action="" method="post">
                    <div class="applytable">
                        <div class="paylist">
                            <ul>
                                <li><img src="<?= $this->cdn ?>/images/gift/11.jpg" alt="创意卡包" class="gift"/>
                                    <br/><span>创意卡包一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(1);">立即领取</a></li>
                                <li><img src="<?= $this->cdn ?>/images/gift/12.jpg" alt="创意手机支架" class="gift"/>
                                    <br/><span>创意手机支架一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(2);">立即领取</a></li>
                                <li><img src="<?= $this->cdn ?>/images/gift/13.jpg" alt="兔兔玩偶挂件" class="gift"/>
                                    <br/><span>兔兔玩偶挂件一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(3);">立即领取</a></li>
                                <li><img src="<?= $this->cdn ?>/images/gift/14.jpg" alt="精美书签" class="gift"/>
                                    <br/><span>精美书签一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(4);">立即领取</a></li>
                                <li><img src="<?= $this->cdn ?>/images/gift/15.jpg" alt="创意生活骰子" class="gift"/>
                                    <br/><span>创意生活骰子一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(5);">立即领取</a></li>
                                <li><img src="<?= $this->cdn ?>/images/gift/16.jpg" alt="袖珍绝望鸡" class="gift"/>
                                    <br/><span>袖珍绝望鸡一个</span><br/>
                                    <a class="receive" href="javascript:form_submit(6);">立即领取</a></li>
                            </ul>
                            <div style="clear:both"></div>
                        </div>
                    </div>
                    <?= $this->formHidden('type') ?>
                </form>
                <div class="applyask">
                    <div class="askname">
                        <h2>使用遇到的问题</h2>
                    </div>
                    <ul>
                        <li><a href="http://help.uuch.com/?p=142" target="_blank">1. 代充值申请成功后需要等待多久？</a></li>
                        <li><a href="http://help.uuch.com/?p=144" target="_blank">2. 为什么需要代充值服务？</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<?php if($this->ma !=="" && $this->ma !== null) { ?>
<div class="tanchuang" style="height: 300px;">
    <div class="nui-msgbox">
        <div class="nui-msgbox-hd" style="font-size: 16px;">系统消息</div>
        <a class="nui-msgbox-close" title="关闭"><b></b></a>
    </div>
    <?php if($this->ma===1){?>
    <div class="wenti_box">
        <div style="margin-left: 20px;font-size: 16px;margin-top: 20px;width: 560px;">
            <h3>尊敬的会员：</h3>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;恭喜您，您的会员卡领取成功。您将获得以下优惠：</p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1、获取会员礼物-<?php echo $this->giftName;?>。</p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、获取1元运单体验金。</p>
            <p style="margin-top: 20px;margin-left: 150px;"><a href="javascript:void(0)" class="exitproblem" ><span class="countdown">10</span>秒后自动关闭，立即关闭。</a></p>
        </div>
    </div>
    <?php } else if ($this->ma === 0) { ?>
    <div class="wenti_box2">
        <div style="margin-left: 20px;font-size: 16px;margin-top: 20px;width: 560px;">
            <h3>尊敬的会员：</h3>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对不起，您的会员卡领取失败。可能的原因如下：</p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1、可能是您已经领取过了，不能重复领取。</p>
            <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、可能是您登录失败，如您没有领取过，请退出重新登录领取或者联系悠奇在线客服。</p>
            <p style="margin-top: 20px;margin-left: 150px;"><a href="javascript:void(0)" class="exitproblem" ><span class="countdown">10</span>秒后自动关闭，点击立即关闭。</a></p>
        </div>
    </div>
    <?php  } ?>
</div>
<div class="houtai_overlay"></div>
<script>
    var leftSeconds = 10;
    setInterval("CountDown()", 1000);
    $(".nui-msgbox-close").click(function(){
        $("div.houtai_overlay").hide();
        $("div.tanchuang").hide();
    });
    $(".exitproblem").click(function(){
        $("div.houtai_overlay").hide();
        $("div.tanchuang").hide();
    }); 
    function CountDown() {
        if(leftSeconds<=0){
            $(".exitproblem").click();
        }
        leftSeconds--;
        $(".countdown").html(leftSeconds);
    }
</script>
<?php }?>
<script language="javascript">
    function form_submit(type)
    {
        $('#type').val(type);
        $('#form1').submit();
    }
</script>

<?
if (isset($this->message)) {
    echo '<script language="javascript" type="text/javascript">alert("' . $this->message . '")</script>';
}
?>